/*
 * @Description: 链接 api
 * @Author: zheng yiliang
 * @Date: 2021-05-27 21:11:54
 * @LastEditTime: 2021-05-27 21:28:31
 * @LastEditors: zheng yiliang
 */

import request from '@/utils/request'

// 查询菜单列表
export function getAllLink (query) {
  return request({
    url: '/links/list',
    method: 'get',
    params: query
  })
}

export function addLink (data) {
  return request({
    url: '/links/add',
    method: 'post',
    data
  })
}

export function detailLink (id) {
  return request({
    url: '/links/detail',
    method: 'get',
    params: { id }
  })
}
export function editLink (data) {
  return request({
    url: '/links/edit',
    method: 'put',
    data
  })
}
export function delLink (data) {
  return request({
    url: '/links/del',
    method: 'delete',
    data
  })
}

export function stateChange (data) {
  return request({
    url: '/links/setState',
    method: 'put',
    data
  })
}
